import random


def generate_dataset(size, range_x, range_y, rand_obj=None):
    if rand_obj is None:
        return [(random.uniform(*range_x), random.uniform(*range_y)) for i in range(size)]
    else:
        return [(rand_obj.uniform(*range_x), random.uniform(*range_y)) for i in range(size)]


if __name__ == '__main__':
    d = generate_dataset(100, (0, 50), (0, 50))
    print(d)
